<template>
  <div class="min-h-screen bg-gray-100">
    <nav class="bg-white shadow-md">
      <div class="container mx-auto px-4 py-2 flex justify-between items-center">
        <h1 class="text-2xl font-bold">校园活动管理系统</h1>
        <ul class="flex space-x-4">
          <li><router-link to="/public-activities"
              class="text-gray-700 hover:text-blue-500 transition-colors duration-300">公开活动列表</router-link></li>
          <li><router-link to="/activity-management"
              class="text-gray-700 hover:text-blue-500 transition-colors duration-300">活动管理</router-link></li>
          <li><button @click="logout"
              class="text-gray-700 hover:text-blue-500 transition-colors duration-300">退出登录</button></li>
        </ul>
      </div>
    </nav>
    <div class="container mx-auto px-4 py-8">
      <h2 class="text-2xl font-bold mb-4">活动管理</h2>
      <!-- 这里可以添加增删改查活动的表单和按钮 -->
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      userRole: sessionStorage.getItem('userRole')
    };
  },
  methods: {
    logout() {
      sessionStorage.removeItem('userRole');
      this.$router.push('/login');
    }
  }
};
</script> 